package com.sjyy.common.authority.enums;

public enum RoleEnum{

	PD_PURCHASER("采购物流部-采购员",0,""+AuthorityTypeEnum.PD_PURCHASER_APP.getIndex()),
	PD_RECEIVE("采购物流部-收货员",1,""+AuthorityTypeEnum.PD_RECEIVE.getIndex()
			+","+AuthorityTypeEnum.PD_RECEIVE.getIndex()),
	PD_TALLYMAN("采购物流部-理货员",2,""+AuthorityTypeEnum.PD_STOCK_SHOW.getIndex()),
	PD_DELIVER("采购物流部-配送员",3,""+AuthorityTypeEnum.PD_DELIVER_APP.getIndex()),
	PD_INFOMATION("采购物流部-主管",5,""+AuthorityTypeEnum.PD_RECEIVE.getIndex()
			+","+AuthorityTypeEnum.PD_STOCK_SHOW.getIndex()
			+","+AuthorityTypeEnum.PD_PURCHASE_SHOW.getIndex()
			+","+AuthorityTypeEnum.PD_SUPPLY_SHOW.getIndex()),
	BASIC_ADMIN("信息部-主管",6,""+AuthorityTypeEnum.BASIC_RESTAURANT_SHOW.getIndex()
			+","+AuthorityTypeEnum.BASIC_RESTAURANT_CTRL.getIndex()
			+","+AuthorityTypeEnum.BASIC_RESTAURANT_CONFIRM.getIndex()
			+","+AuthorityTypeEnum.BASIC_ORDER_SHOW.getIndex()
			+","+AuthorityTypeEnum.BASIC_ORDER_CTRL.getIndex()
			+","+AuthorityTypeEnum.BASIC_ORDER_EDIT.getIndex()
			+","+AuthorityTypeEnum.BASIC_ORDER_EXPORT.getIndex()
			+","+AuthorityTypeEnum.BASIC_ORDER_FINACIAL.getIndex()
			+","+AuthorityTypeEnum.BASIC_ORDER_CANCEL.getIndex()
			+","+AuthorityTypeEnum.category_maintain_colon_index.getIndex()
			+","+AuthorityTypeEnum.BASIC_CATEGORY_CTRL.getIndex()
			+","+AuthorityTypeEnum.BASIC_CATEGORYTYPE_SHOW.getIndex()
			+","+AuthorityTypeEnum.BASIC_ORDER_DETAIL_SHOW.getIndex()
			+","+AuthorityTypeEnum.BASIC_ORDER_DETAIL_EDIT.getIndex()
			+","+AuthorityTypeEnum.BASIC_ORDER_DETAIL_MODIFY.getIndex()),
	BASIC_EXPORTMAN("信息部-订单操作员",7,""+AuthorityTypeEnum.BASIC_ORDER_SHOW.getIndex()
			+","+AuthorityTypeEnum.BASIC_ORDER_CTRL.getIndex()
			+","+AuthorityTypeEnum.BASIC_ORDER_EXPORT.getIndex()
			+","+AuthorityTypeEnum.BASIC_ORDER_EDIT.getIndex()
			+","+AuthorityTypeEnum.BASIC_ORDER_DETAIL_SHOW.getIndex()
			+","+AuthorityTypeEnum.BASIC_ORDER_DETAIL_EDIT.getIndex()),
	BASIC_CATEGORYMAN("信息部-商品维护员",8,""+AuthorityTypeEnum.BASIC_ORDER_SHOW.getIndex()
			+","+AuthorityTypeEnum.category_maintain_colon_index.getIndex()
			+","+AuthorityTypeEnum.BASIC_CATEGORY_CTRL.getIndex()),
	BASIC_CUSTOMER_SERVICE("信息部-客服",9,""+AuthorityTypeEnum.BASIC_ORDER_SHOW.getIndex()
			+","+AuthorityTypeEnum.BASIC_ORDER_EDIT.getIndex()
			+","+AuthorityTypeEnum.BASIC_ORDER_EXPORT.getIndex()
			+","+AuthorityTypeEnum.BASIC_ORDER_CANCEL.getIndex()
			+","+AuthorityTypeEnum.category_maintain_colon_index.getIndex()
			+","+AuthorityTypeEnum.BASIC_CATEGORYTYPE_SHOW.getIndex()
			+","+AuthorityTypeEnum.BASIC_RESTAURANT_SHOW.getIndex()
			+","+AuthorityTypeEnum.BASIC_RESTAURANT_CONFIRM.getIndex()
			+","+AuthorityTypeEnum.BASIC_ORDER_DETAIL_SHOW.getIndex()
			+","+AuthorityTypeEnum.BASIC_ORDER_DETAIL_EDIT.getIndex()
			+","+AuthorityTypeEnum.BASIC_ORDER_DETAIL_MODIFY.getIndex()),
	;
	private String name;
	private int index;
	private String auths;

	private RoleEnum(String name, int index, String auths) {
		this.name = name;
		this.index = index;
		this.auths = auths;
	}

	public static String getAuthorityTypeStr(int index) {
		for (RoleEnum a : RoleEnum.values()) {  
	        if (a.getIndex() == index) {  
	            return a.name;  
	        }  
	    }  
	    return null;  
	}
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getIndex() {
		return index;
	}

	public void setIndex(int index) {
		this.index = index;
	}

	public String getAuths() {
		return auths;
	}

	public void setAuths(String auths) {
		this.auths = auths;
	}

}